package org.lennon.demo.ddd.ticket.service;

import org.lennon.demo.ddd.ticket.aggregate.command.TicketCreateCommand;
import org.lennon.demo.ddd.ticket.aggregate.command.TicketGiveOutCommand;
import org.lennon.demo.ddd.ticket.aggregate.command.TicketReduceCommand;

import java.util.Set;

public interface TicketAppicationService {

    /**
     * 创建
     *
     * @param ticketCreateCommand
     */
    public void create(TicketCreateCommand ticketCreateCommand);

    /**
     * 给用户加券
     *
     */
    public void giveOut(TicketGiveOutCommand ticketGiveOutCommand);

    /**
     * 给用户扣券
     *
     */
    public void reduce(TicketReduceCommand ticketReduceCommand);

    /**
     * 批量上课
     * @param userId
     * @param classIds
     * @param singleAmount
     */
    public void batchReduce(Long userId, Set<Long> classIds, Integer singleAmount);
}
